package org;

import java.sql.PreparedStatement;

public class sqlStatements {
	
	//Database Table Names
    public final static String DRAWINGS = "drawings";
    public final static String LAYERS = "layers";
    public final static String DRAWCMD = "drawcmd";
	public static final String PROPERTIES = "properties";
    public final static String TABLE_FAVOURITE_COLOR = "FavouriteColor";
    
  //Database Coloumn Names
    public final static String DID = "did";
    public final static String NAME = "name";
    public final static String LASTSTATE = "lastState";
    public final static String IMAGE = "image";
    public final static String LID = "lid";
    public final static String DCID = "dcid";
    public static final String COMMAND = "command";
    public static final String COORDINATES = "coordinates";
    public static final String INSTRUCT_NUM = "instructNum";
    public static final String PID = "pID";
    public static final String COLOR = "color";
    public static final String FILL = "fill";
    public static final String STROKE_SIZE = "strokeSize";
    public static final String ZINDEX="zindex";

    public final static String createDrawingsTable="CREATE TABLE " + DRAWINGS
    		+ "("+ DID + " INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,"
    				+ NAME + " TEXT DEFAULT Untitled,"
    						+ LASTSTATE + " Integer Not Null DEFAULT 0," 
    						+ IMAGE + " BLOB)";
    
    public final static String createLayersTable= "CREATE TABLE " + LAYERS
    		+ " (" + LID + " INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, "
    		+ DID + " TEXT REFERENCES '" + DRAWINGS + "' "
    				+ "('" +  DID + "') MATCH SIMPLE ON UPDATE CASCADE ON DELETE SET NULL,"
    						+ ZINDEX + " Integer);";
    
    public final static String createDrawCMDTable= "Create Table " + DRAWCMD
    		+ "(" + DCID +" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,"
    		+ "lid TEXT REFERENCES '"+LAYERS+"' ('"+LID+"') MATCH SIMPLE"
    				+ " ON UPDATE CASCADE ON DELETE SET NULL,"
    				+ "coordinates TEXT, command TEXT, instructNum Integer,"
    				+ "mid TEXT REFERENCES '"+DRAWCMD+"' ('"+DCID+"') MATCH SIMPLE"
    						+ " ON UPDATE CASCADE ON DELETE CASCADE,"
    						+ "image BLOB);";
    
    public final static String DC_CREATE_LAYER="Create Layer";
	public static final String DC_BRUSH = "Brush";
	public static final String DC_RECTANGLE = "Rectangle";
	public static final String DC_CIRCLE = "Circle";
	public static final String DC_LINE = "Line";
	public static final String DC_ARC = "Arc";
	public static final String DC_SHAPE = "Shape";
	public static final String DC_MOVE_UP = "Move Up";
	public static final String DC_MOVE_DOWN = "Move Down";
	public static final String DC_DELETE_LAYER = "Delete Layer";
	public static final String TRANSFORM_LAYER = "Transform Layer";
	public static final String DC_ERASE = "Erase";

	
	

}
